from odoo import models, fields, api, _
from odoo.exceptions import UserError, ValidationError


# 审批流类
class Workflow(models.Model):
    _inherit = 'sb.workflow'

    subcontracting_id = fields.Many2one('sb.subcontracting.apply', string="Related Documents", ondelete="cascade")
    workflow_type = fields.Selection(selection_add=[
        ('subcontracting', 'Subcontracting'),
    ], ondelete={'activity': 'cascade'})